package org.springblade.tms.module.monitor.controller;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springblade.core.log.annotation.ApiLog;
import org.springblade.core.secure.annotation.PreAuth;
import org.springblade.core.tool.api.R;
import org.springblade.tms.global.entity.TimeInterval;
import org.springblade.tms.module.monitor.base.MonitorService;
import org.springblade.tms.module.monitor.vo.TransportationStatisticsVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @projectName: BladeX
 * @package: org.springblade.tms.module.monitor
 * @className: MonitorController
 * @author: yr
 * @description: 监控接口
 * @date: 2022/3/18 11:31
 */
@RestController
@RequestMapping("monitor")
@Api(value = "监控接口-yr", tags = "监控接口-yr")
public class MonitorController {
	@Resource
	private MonitorService monitorService;

	/**
	 * @param timeInterval:
	 * @return R
	 * @author yr
	 * @description 运输统计
	 * @date 2022/3/18 13:49
	 */
	@ApiLog("运输统计")
	@GetMapping("/transportationStatistics")
	@ApiOperationSupport(order = 1)
	@ApiOperation(value = "运输统计", notes = "传入timeInterval")
public R<TransportationStatisticsVo> transportationStatistics(TimeInterval timeInterval) {
		return monitorService.transportationStatistics(timeInterval);
	}
}
